package com.atgugui.educms;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * CMS服务模块的启动类
 */
@SpringBootApplication
@ComponentScan(basePackages = "com.atgugui") // 扫描非该模块的其他模块
@MapperScan(basePackages = "com.atgugui.educms.mapper") // 扫描该模块中的mapper接口
@EnableDiscoveryClient // 注册到nacos
@EnableFeignClients // 调用远程服务接口
@EnableSwagger2 // 开启Swagger接口测试
@EnableCaching // 开启缓存（启动类中如果不开启缓存，Redis缓存可能无法使用即@Cachable注解失效）
public class CmsServiceApplication {
    public static void main(String[] args) {
        SpringApplication.run(CmsServiceApplication.class,args);
    }
}
